package com.ktjy.controller;

import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
//@RequestMapping("/")
public class HelloController {
    Logger logger = LoggerFactory.getLogger(HelloController.class);

//    @RequestMapping("/hello")
//    @RequestMapping({"/hello","hello2"})
//    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    @RequestMapping(value = "/hello",method = {RequestMethod.GET,RequestMethod.POST})
    public String hello(){
            logger.info("hello方法执行了");
            return "hello";
    }
}
